﻿using System;
namespace Kis.Xroad.Eu {
    
    
    [System.SerializableAttribute()]
    public class SimpleListType : global::Xtee.Core.Types.ListTypeBase<global::Kis.Xroad.Eu.SizeType> {
        
        public SimpleListType(string value) : 
                base(value) {
            this.Validate();
        }
        
        public SimpleListType() : 
                base(new System.Collections.Generic.List<global::Kis.Xroad.Eu.SizeType>()) {
        }
        
        public SimpleListType(System.Collections.Generic.IList<global::Kis.Xroad.Eu.SizeType> value) : 
                base(value) {
            this.Validate();
        }
        
        public static bool TryParse(string value, out global::Kis.Xroad.Eu.SimpleListType result) {
            try {
                result = new global::Kis.Xroad.Eu.SimpleListType(value);
                return true;
            }
            catch (System.Exception ) {
                result = null;
                return false;
            }
        }
        
        public static global::Kis.Xroad.Eu.SimpleListType Parse(string value) {
            global::Kis.Xroad.Eu.SimpleListType _SimpleListType = null;
            if (global::Kis.Xroad.Eu.SimpleListType.TryParse(value,out _SimpleListType)) {
                return new SimpleListType(_SimpleListType);
            }
             throw new FormatException("Cannot parse to type [global::Kis.Xroad.Eu.SimpleListType] from string value : [" + value + "]");;
        }
        
        public override global::Kis.Xroad.Eu.SizeType ParseElement(string value) {
            return new global::Kis.Xroad.Eu.SizeType(value);
        }
    }
}
